//
//  TotalAssets.h
//  MyWallet
//
//  Created by 小肥羊 on 15/7/15.
//  Copyright (c) 2015年 小肥羊. All rights reserved.
//
//  总资产

#import <Foundation/Foundation.h>

#pragma mark - 卡模型
@interface CardModel : NSObject

@property (nonatomic, strong) NSString *cardName;
@property (nonatomic) float cardMoney;
@property (nonatomic) BOOL isActivation;

- (void)cancellation;

@end


#pragma mark - 总资产

#pragma mark - 总资产代理
@class TotalAssets;
@protocol TotalAssetsDelegate <NSObject>

- (void)upTotalAssets:(TotalAssets *)totalAssets Money:(float)money;

@end

#pragma mark - 总资产模型
@interface TotalAssets : NSObject

#pragma mark - 属性
@property (nonatomic) float walletMoney;
@property (nonatomic, strong) CardModel *card1;
@property (nonatomic, strong) CardModel *card2;
@property (nonatomic, strong) CardModel *card3;
@property (nonatomic, strong) CardModel *card4;
@property (nonatomic, strong) CardModel *card5;
@property (nonatomic, strong) CardModel *card6;

@property (nonatomic, retain) id <TotalAssetsDelegate> delegate;      /**< 总资产代理 */

/*! @brief TotalAssets单例 */
+ (TotalAssets *)sharedManager;

#pragma mark - 公共方法
/*! @brief 获取卡 */
- (CardModel *)cardWithIndexString:(NSString *)indexString;
/*! @brief 计算总资产 */
- (float)totalAssets;

#pragma mark - 变值操作
- (BOOL)saveWallemoney:(float)money RecordDate:(NSDate *)date MoneyFor:(NSString *)moneyFor Remarks:(NSString *)remarks;
- (BOOL)drawWallemoney:(float)money RecordDate:(NSDate *)date MoneyFor:(NSString *)moneyFor Remarks:(NSString *)remarks;

/*! @brief 激活卡 */
- (BOOL)activationCard:(NSString *)indexString CardName:(NSString *)cardName Money:(float)money RecordDate:(NSDate *)data Initialization:(BOOL)initialization;
/*! @brief 注销卡 */
- (BOOL)cancellationCard:(NSString *)indexString RecordDate:(NSDate *)date toWalletMoney:(BOOL)toWalletMoney;

/*! @brief 刷卡消费 */
- (BOOL)drawCard:(NSString *)indexString Money:(float)money RecordDate:(NSDate *)date MoneyFor:(NSString *)moneyFor Remarks:(NSString *)remarks;
/*! @brief 取钱到钱包里 */
- (BOOL)cardToPurse:(NSString *)indexString Money:(float)money RecordDate:(NSDate *)date;
/*! @brief 卡收入 */
- (BOOL)saveCard:(NSString *)indexString Money:(float)money RecordDate:(NSDate *)date MoneyFor:(NSString *)moneyFor Remarks:(NSString *)remarks;
/*! @brief 钱包存入卡里 */
- (BOOL)purseToCard:(NSString *)indexString Money:(float)money RecordDate:(NSDate *)date;

/*! @brief 还原 */
- (void)reduction:(NSString *)moneyFrom Money:(float)money IsSave:(BOOL)isSave;
/*! @brief 修改 */
- (void)modifyRecord:(NSString *)moneyFrom ChangeMoney:(float)money IsSave:(BOOL)isSave;

@end
